At 15:24 +0300 on 07/07/1999, Alessandro Rossi wrote:
> I GET:
>
> id|code|status
> --+------+------
> 1| 44111|N
> 2| 123|S
>
> BUT I WOULD LIKE TO GET
>
> id|code|status
> --+------+------
> 1|044111|N
> 2|000123|S
>
> How could I fix the prbolem and get the values as I ned them out of the
> select ?
Try lpad. For example:
testing=> select num, lpad( num, 6, '0' ) from test1; num| lpad
------+------ 2|000002 4|000004 38|000038 199|000199
100399|100399
(5 rows)
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma